package com.ymatou.iapi.productlist.service;

import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;


public class GetTopProductListByLiveIdCall extends YmatouBaseCall{
	private static String opurl ="/api/Product/GetTopProductListByLiveId";
	
	public GetTopProductListByLiveIdCall() {
		super(EnvSetup.getSystemUrl("productlist"),opurl,"GET","PARAMETER");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	

	public static JSONObject GetTopProductListByLiveId(int liveId) throws Exception{
		GetTopProductListByLiveIdCall getTopProductListByLiveId=new GetTopProductListByLiveIdCall();
		getTopProductListByLiveId.setData("LiveId=" + liveId);
		getTopProductListByLiveId.callService();
		return  new JSONObject(getTopProductListByLiveId.getReturnData()) ;
	}
	
	public static void main(String[] args) throws Exception {
		GetTopProductListByLiveId(150867);
	}
	

}
